/*
 * @Description: 工单分页
 * @Version: V1.0.0
 * @Autor: CHY
 * @Date: 2022-03-31 16:14:13
 * @LastEditors: CHY
 * @LastEditTime: 2022-04-02 10:23:01
 */
import React, { useState, useEffect } from 'react';
import zhCN from 'antd/lib/locale/zh_CN';
import { Pagination,ConfigProvider } from 'antd';
const OrderPagination = (props) => {
    const [nowPage, setNowPage] = useState(0);
    const [totalPage, setTotalPage] = useState(0);
    const changePage = (props) => {
        // console.log('工单分页',props);
    }
    useEffect(() => {
        setNowPage(1)
        setTotalPage(props.total)
        console.log('工单分页',props.total);
    }, [props]);
    return (
        <>
        <ConfigProvider locale={zhCN}>
            <Pagination onChange={changePage} defaultCurrent={nowPage} total={totalPage} pageSizeOptions={[10, 20, 30]} current />
        </ConfigProvider>

        </>
    );
}

export default OrderPagination;
